package com.prj.ufdm.cloud.ms.auth.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import com.prj.ufdm.cloud.ms.auth.model.SysOrgan;
import com.prj.ufdm.cloud.ms.core.dao.BaseDao;

@Mapper
public interface SysOrganDao extends BaseDao<SysOrgan> {
	
    /**
     * Desc: 删除
     * @param id
     * @return
     */
    public Integer deleteOrganByOrganId(String id) throws Exception;

    /**
     * Desc: 根据id查询机构信息
     * @param organId
     * @return
     */
    public List<SysOrgan> selectOrganListByOrganId(String id) throws Exception;
    
    /**
     * Desc: 根据用户id查询，授权机构（通过职务关联）
	 * @param organId
	 * @return
	 */
	public List<SysOrgan> selectGrantOrganByUserId(String userId) throws Exception;
	
	public SysOrgan selectByOrganId(String organId) throws Exception;

	public SysOrgan selectOrganByUserId(SysOrgan sysOrgan) throws Exception;

	public List<SysOrgan> selectChildrenListByOrganId(SysOrgan sysOrgan) throws Exception;

}
